'use strict';
var dayjs = require('dayjs')
var duration = require('dayjs/plugin/duration')
dayjs.extend(duration)
module.exports = {
    /**
     * XXXnameXXX
     * @url client/booths/kh/getBoothsInfo 前端调用的url参数地址
     * data 请求参数
     * @param {String} params1  参数1
     */
    main: async (event) => {
        let {
            data = {}, userInfo, util, filterResponse, originalParam
        } = event;
        let {
            customUtil,
            uniID,
            config,
            pubFun,
            vk,
            db,
            _
        } = util;
        let {
            uid
        } = data;
        let res = {
            code: 0,
            msg: ""
        };
        let dbName = "bidding-order";
        res = await vk.baseDao.getTableData({
            dbName,
            data,
            whereJson: {
                status: _.neq(-2),
                userid: uid,
            },
            sortArr: [
                {
                    "name": "_add_time",
                    "type": "desc"
                },
                {
                    "name": "status",
                    "type": "asc"
                },
               
            ]
        });
        return res;
    }
}